/// @tags:
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>
#include <set>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

constexpr int maxn = 1e5;

int a[maxn + 2];

int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    std::set<int> s;
    for (int i = 1; i <= n; ++i) {
      cin >> a[i];
      s.insert(a[i]);
    }
    bool flag = false;
    for (int i = 1; i <= n; ++i) {
      if (s.find(a[i] ^ 1) != s.end()) {
        flag = true;
        break;
      }
    }
    cout << (flag ? "Yes\n" : "No\n");
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("E. Great Detective TJC.in", "r", stdin);
  freopen("E. Great Detective TJC.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
